package com.example.administrator.orchardeveryday.bean.dbbean;

import android.database.Cursor;

import com.example.administrator.orchardeveryday.dao.DbBean;

import java.io.Serializable;

/**
 * Created by Administrator on 15-10-25.
 */
public class Goods implements Serializable{
    private int id;
    private String goodsName;
    private double price;
    private int number;

    public Goods() {
    }

    public Goods(int id, String goodsName, double price, int number) {
        this.id = id;
        this.goodsName = goodsName;
        this.price = price;
        this.number = number;
    }

    public Goods(Cursor cursor)
    {
        goodsName=cursor.getString(cursor.getColumnIndex(DbBean.GoodsDb.GOODS_NAME));
        price=cursor.getFloat(cursor.getColumnIndex(DbBean.GoodsDb.GOODS_PRICE));
        number=cursor.getInt(cursor.getColumnIndex(DbBean.GoodsDb.GOODS_NUMBER));
    }
    public long getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }
}
